import com.udf.AopShow.service.IHelloService;
import com.udf.AopShow.service.IPermissonService;
import com.udf.AopShow.service.impl.HelloServiceImpl;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * Created by zwr on 2014/11/1.
 */

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:JPAPermissionFilterContext.xml")
public class testAopInnerInvokeByLAW {

    @Autowired
    IHelloService hs;

    @Autowired
    IPermissonService ps;

    @Test
    public void testAop(){
      hs.sayHello();
//        System.out.println("outer hs hashcode:"+hs.hashCode());
//        HelloServiceImpl HH1 = new HelloServiceImpl();
//        HH1.sayHello();

    }

    @Test
    public void testPermission(){
        String a = ps.listName();
        System.out.println("return:  "+ a);
    }

}
